Form validation is used to check whether data entered via a web application is valid. When the entered data is not valid, error handling is used to alert a user to the error.
Today, client side validation is used to validate entered data and can be complex as numerous validation rules can be applied to the entered data. Typically, validation code is written for a particular situation and is not reusable across clients or servers. Thus, code written to validate data entered in one situation may be unusable in other situations.